program Spiski;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  pelement = ^ element;
  element = record
    value: integer;
    next: pelement;
  end;

procedure AddToBeginning (var head: pelement; num: integer);
var
  tmp: pelement;

begin
  tmp:= head;
  new (head);
  head^.next:=tmp;
  head^.value:=num;
end;

procedure PrintList (head: pelement);
var
  current: pelement;
begin
  current:=head;
  while (current <> nil) do
  begin
    writeln(current^.value);
    current:=current^.next;
  end;
end;

procedure DeleteEven (var head: pelement);
var
  current, tmp: pelement;
  f: boolean;
begin
  current:=head;
  if head <> nil then
  begin
    current:=head;
    while current^.next^.next <> nil do
    begin
      f:=False;
      if (head^.value mod 2) = 0 then
      begin
        current:= current^.next;
        dispose(head);
        head:=current;
      end;
      if (current^.next^.value mod 2) = 0 then
      begin
        tmp:= current^.next^.next;
        dispose(current^.next);
        current^.next:= tmp;
        f:=True;
      end;
      if f = False then
      begin
        current:=current^.next;
      end;
    end;
    if (current^.next^.value mod 2) = 0 then
    begin
      dispose(current^.next);
      current^.next:= nil;
    end;
  end;
end;

procedure PlusNumber (var head: pelement);
var
  current: pelement;
  a: Integer;
begin
  current:= head;
  a:=1;
  while current^.next <> nil do
  begin
    current^.value:=current^.value+a;
    a:=a+1;
    current:=current^.next;
  end;
  current^.value:=current^.value+a;
end;

procedure AddToEnd (var head: pelement; num: integer);
var
  current: pelement;
begin
  if (head <> nil) then
  begin
    current:=head;
    while (current^.next <> nil) do
    begin
      current:=current^.next;
    end;
    new (current^.next);
    current^.next^.value:=num;
    current^.next^.next:=nil;
  end else begin
    AddToBeginning (head, num);
  end;
end;

var
  fin: TextFile;
  n, a, i: integer;
  head: pelement;

begin
  AssignFile (fin, 'input.txt');
  Reset(fin);
  head:= nil;
  Readln(fin, n);
  for i:=1 to n do
  begin
    read(fin, a);
    AddToEnd(head, a);
  end;
  DeleteEven (head);
  PlusNumber (head);
  PrintList (head);
  Readln;
  CloseFile(fin);
end.
